import Vue from 'vue'
import VueRouter from 'vue-router'
import IndexView from '../views/homeViews/IndexView.vue'

Vue.use(VueRouter)

const routes = [
  //首页
  {
    path: '/',
    component: IndexView
  },
  //介绍
  {
    path: '/jieshao',
    component: () => import('../views/homeViews/JieShaoView.vue'),
  },
  //申报指南
  {
    path: '/zhinan',
    component: () => import('../views/homeViews/ZhiNanView.vue'),
  },
  //项目申报
  {
    path: '/login',
    component: () => import('../views/homeViews/LoginView.vue'),
  },
  //联系我们
  {
    path: '/lianxi',
    component: () => import('../views/homeViews/LianXiView.vue'),
  },



  // 管理员
  {
    path: '/admin',
    name: 'admin',
    component: () => import('../views/adminViews/AdminView.vue'),
  },
  // 登录用户管理
  {
    path: '/admin/showusers',
    component: () => import('../views/adminViews/ShowUsersView.vue'),
  },
  // 专家信息管理
  {
    path: '/admin/showexperts',
    component: () => import('../views/adminViews/ShowExpertsView.vue')
  },
  // 单位信息管理
  {
    path: '/admin/showunits',
    component: () => import('../views/adminViews/ShowUnitsView.vue')
  },
  // 项目类信息管理
  {
    path: '/admin/showprojectCategorys',
    component: () => import('../views/adminViews/ShowProjectView.vue')
  },
  // 添加用户
  {
    path: '/admin/adduser',
    component: () => import('../views/adminViews/AddUserView.vue')
  },
  // 修改专家信息
  {
    path: '/admin/expertinfo',
    component: () => import('../views/adminViews/ExpertInfoView.vue')
  },
  // 修改单位信息
  {
    path: '/admin/unitinfo',
    component: () => import('../views/adminViews/UnitInfoView.vue')
  },
  // 修改项目信息
  {
    path: '/admin/projectinfo',
    component: () => import('../views/adminViews/ProjectInfoView.vue')
  },
  // 添加项目类
  {
    path: '/admin/addprojectcategory',
    component: () => import('../views/adminViews/AddProjectView.vue')
  },

  // 专家
  {
    path: '/expert',
    name: 'expert',
    redirect: '/expert/expertViewInit',
    component: () => import('../views/expertViews/ExpertView.vue'),
    children: [
      //初始化界面
      {
        path: 'expertViewInit',
        component: () => import('../views/expertViews/ExpertViewInit')
      },
      // 修改专家信息
      {
        path: 'expertinfo',
        component: () => import('../views/expertViews/ExpertInfoView.vue')
      },
      // 修改密码
      {
        path: 'reworkpassword',
        component: () => import('../views/expertViews/ReworkPasswordView.vue')
      },
      //展示项目类信息
      {
        path: 'showprojectcategory',
        component: () => import('../views/expertViews/ShowProjectCategoryView.vue')
      },
      //展示项目信息
      {
        path: 'showproject',
        component: () => import('../views/expertViews/ShowProjects.vue')
      },
      {
        path: 'projectinfo',
        component: () => import('../views/expertViews/ProjectinfoView.vue')
      },
    ]
  },









  // 单位用户
  {
    path: '/unit',
    name: 'unit',
    component: () => import('../views/unitViews/UnitView.vue')
  },
  //查看单位信息
  {
    path: '/unit/unitinfo',
    name: 'unit',
    component: () => import('../views/unitViews/UnitInfoView.vue')
  },
  //修改密码
  {
    path: '/unit/reworkpassword',
    name: 'unit',
    component: () => import('../views/unitViews/ReworkPasswordView.vue')
  },
  // 展示所有项目类
  {
    path: '/unit/showprojectcategory',
    component: () => import('../views/unitViews/ShowProjectCategorysView.vue')
  },
  // 申报项目
  {
    path: '/unit/applyproject',
    component: () => import('../views/unitViews/ApplyProjectView.vue')
  },
  // 简单查询
  {
    path: '/unit/simplesearch',
    component: () => import('../views/unitViews/SimpleSearchView.vue')
  },
  // 简单查询1
  {
    path: '/unit/simplesearch1',
    component: () => import('../views/unitViews/SimpleSearch1View.vue')
  },
  // 高级查询
  {
    path: '/unit/highquery',
    component: () => import('../views/unitViews/HighQueryView.vue')
  },
  // 高级查询1
  {
    path: '/unit/highquery1',
    component: () => import('../views/unitViews/HighQuery1View.vue')
  },
  // 显示项目信息
  {
    path: '/unit/projectinfo1',
    component: () => import('../views/unitViews/ProjectInfo1View.vue')
  },
  //修改项目信息
  {
    path: '/unit/projectinfo',
    component: () => import('../views/unitViews/ProjectInfoView.vue')
  },

]

const router = new VueRouter({
  routes
})

export default router
